package com.heima.admin.controller.v1;

import com.heima.apis.admin.IAdminChannelClient;
import com.heima.apis.admin.IAdminSensitiveClient;
import com.heima.model.admin.dtos.SensitiveDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/api/v1/sensitive")
public class SensitiveController {
@Autowired
private IAdminSensitiveClient adminClient;
    @PostMapping("/save")
    ResponseResult addsensitive(@RequestBody WmSensitive wmSensitive){
        return adminClient.addsensitive(wmSensitive);
    }
    @PostMapping("/list")
    ResponseResult getList(@RequestBody SensitiveDto sensitiveDto){
        return adminClient.getSensitiveList(sensitiveDto);
    }
    @PostMapping("/update")
    public ResponseResult update(@RequestBody WmSensitive wmSensitive){
        return adminClient.updateSensitive(wmSensitive);
    }
}
